/**
 * @(#)DataCheckStatusEnum.java 2017年06月08日
 * Copyright(C) 2016 ZHEXIN IT CO.,LTD. All rights reserved.
 */
package org.jsbd.boss.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 数据校验状态
 * 
 * @author <a href="mailto:xupengcheng@zhexinit.com" >徐鹏程</a>
 * @version 1.0.0
 */
public enum DataCheckStatusEnum {
	SUCCESS(1, "成功"), FAIL(2, "失败"), UPDATE(3, "更新"), ;

	private int type;
	private String name;

	private DataCheckStatusEnum(int type, String name) {
		this.type = type;
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	private static Map<Integer, DataCheckStatusEnum> map = new HashMap<Integer, DataCheckStatusEnum>();

	static {
		for (DataCheckStatusEnum apkBaseEnum : DataCheckStatusEnum.values()) {
			map.put(apkBaseEnum.type, apkBaseEnum);
		}
	}

	public static DataCheckStatusEnum valueOf(int type) {
		return map.get(type);
	}
}
